package com.hdhere.core.data;

import com.hdhere.domain.common.util.LoginUtils;
import org.springframework.data.domain.AuditorAware;

import java.util.Optional;

/**
 * Created by dus on 2018/12/14.
 */
public class UserAuditor implements AuditorAware<Long> {
    @Override
    public Optional<Long> getCurrentAuditor() {

        return Optional.of(LoginUtils.getLoginUser().getId());
    }
}
